home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form StrFrm
- BackColor = &H00C0C0C0&
- Caption = "String Tests"
- ClientHeight = 3210
- ClientLeft = 2145
- ClientTop = 2025
- ClientWidth = 5160
- Height = 3615
- Left = 2085
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3210
- ScaleWidth = 5160
- Top = 1680
- Width = 5280
- Begin CommandButton UpdCmd
- Caption = "Update"
- Height = 495
- Left = 3240
- TabIndex = 6
- Top = 2040
- Width = 1095
- End
- Begin Frame Frame1
- Caption = "String Type"
- Height = 1455
- Left = 840
- TabIndex = 2
- Top = 1440
- Width = 1575
- Begin CheckBox Chk
- Caption = "IsStrAlNum"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 5
- Top = 1080
- Width = 1215
- End
- Begin CheckBox Chk
- Caption = "IsStrAlph"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 4
- Top = 720
- Width = 1095
- End
- Begin CheckBox Chk
- Caption = "IsStrText"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 3
- Top = 360
- Width = 1215
- End
- End
- Begin TextBox Text2
- Height = 375
- Left = 3000
- TabIndex = 8
- Text = "def"
- Top = 720
- Width = 1935
- End
- Begin TextBox Text1
- Height = 375
- Left = 360
- TabIndex = 0
- Text = "Abdcefghi"
- Top = 720
- Width = 2415
- End
- Begin Label Label3
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3000
- TabIndex = 9
- Top = 1320
- Width = 1935
- End
- Begin Label Label2
- BackColor = &H00C0C0C0&
- Caption = "INSTRI Find$:"
- Height = 255
- Left = 3000
- TabIndex = 7
- Top = 360
- Width = 1335
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- Caption = "Text String:"
- Height = 255
- Left = 360
- TabIndex = 1
- Top = 360
- Width = 1095
- End
- defint a-z
- Sub Form_Paint ()
- ConvexFrm StrFrm, 5
- ConcaveCtl Text1, 3
- ConcaveCtl Frame1, 3
- ConcaveCtl Text1, 3
- ConcaveCtl Text2, 3
- ConvexCtl Label3, 3
- End Sub
- Sub UpdCmd_Click ()
-
- For x = 1 To 3
- chk(x).value = 0
- Next x
- s$ = LTrim$(RTrim$(Text1.text))
- If Len(s$) Then
- If IsStrText(s$) Then chk(1).value = 1
- If IsStrAlph(s$) Then chk(2).value = 1
- If IsStrAlNum(s$) Then chk(3).value = 1
- f$ = LTrim$(RTrim$(Text2.text))
- If Len(f$) Then
- j = instri(0, s$, f$)
- If j Then
- Label3.Caption = "Find$ found at pos" + Str$(j)
- Else
- Label3.Caption = "Not found"
- End If
- Else
- Label3.Caption = "No FIND$"
- End If
- End If
- Text1.SetFocus
- End Sub
-